package com.cqgc.mapper;


import com.cqgc.pojo.dto.LogsDTO.LogsParm;
import com.cqgc.pojo.entity.Logs;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LogsMapper {
    @Insert("insert into logs(execute_time,module,operation,class_name,method_name,request_params,client_ip,create_time,account) values(#{executeTime},#{module},#{operation},#{className},#{methodName},#{requestParams},#{clientIp},now(),#{account})")
    int addLog(Logs logEntity);

    List<Logs> pageQuery(LogsParm logsParm);

    @Delete("delete from logs where id=#{id}")
    int deleteLog(int id);


    int deleteByIds(@Param("operIds") List<Long> operIds);

}
